import { App } from '@vue/runtime-dom';
import {
  Alert,
  Avatar,
  Badge,
  Breadcrumb,
  Button,
  Calendar,
  Card,
  Cascader,
  Checkbox,
  Col,
  ConfigProvider,
  DatePicker,
  Descriptions,
  Divider,
  Drawer,
  Dropdown,
  Empty,
  Form,
  Input,
  InputNumber,
  Layout,
  List,
  Menu,
  Modal,
  PageHeader,
  Popconfirm,
  Popover,
  Progress,
  Radio,
  Result,
  Row,
  Select,
  Skeleton,
  Space,
  Spin,
  Statistic,
  Steps,
  Switch,
  Table,
  Tabs,
  Tag,
  Timeline,
  TimePicker,
  Tooltip,
  Tree,
  TreeSelect,
  Upload,
  Pagination,
  Carousel,
  Collapse,
  Anchor,
  Affix,
} from 'ant-design-vue';

/**
 * 添加antd组件
 */
const installAntdComponents = {
  install(app: App): void {
    app.use(ConfigProvider);
    app.use(Layout);
    app.use(Input);
    app.use(InputNumber);
    app.use(Button);
    app.use(Switch);
    app.use(Radio);
    app.use(Checkbox);
    app.use(Select);
    app.use(Card);
    app.use(Form);
    app.use(Row);
    app.use(Col);
    app.use(Modal);
    app.use(Table);
    app.use(Tabs);
    app.use(Badge);
    app.use(Popover);
    app.use(Dropdown);
    app.use(List);
    app.use(Avatar);
    app.use(Breadcrumb);
    app.use(Steps);
    app.use(Spin);
    app.use(Menu);
    app.use(Drawer);
    app.use(Tooltip);
    app.use(Alert);
    app.use(Tag);
    app.use(Divider);
    app.use(DatePicker);
    app.use(TimePicker);
    app.use(Upload);
    app.use(Progress);
    app.use(Skeleton);
    app.use(Popconfirm);
    app.use(PageHeader);
    app.use(Result);
    app.use(Statistic);
    app.use(Descriptions);
    app.use(Space);
    app.use(Tree);
    app.use(TreeSelect);
    app.use(Empty);
    app.use(Timeline);
    app.use(Calendar);
    app.use(Cascader);
    app.use(Pagination);
    app.use(Carousel);
    app.use(Collapse);
    app.use(Anchor);
    app.use(Affix);
  },
};

export default installAntdComponents;
